var constants = require('../constants');
let ids = 0;
module.exports = function (state, action) {
    if (state === undefined) state = { todo: [] };
    console.log('ccc');
    // switch (action.type) {
    //     case constants.ADD_TODO:
    //         state.todo.push({
    //             title: action.val,
    //             id: ++ids
    //         })
    //         break;
    //     case constants.DESTORY_TODO:
    //         var model = state.find(item=>{
    //             return item.id == action.val.id
    //         });
    //         console.log(model);
    //         break;
    //     case constants.TOGGLE_TODO:
    //         break;
    // }
    return Object.assign({}, state);
}